package snippet;

public class Peer
{
    /* static final String uuidgen = "27a5f962c45311e09adf485b39f7f2e4"; */
    // static final String uuidgen = "1101";

    final String uuidgen = "1101"; //"102030405060708090A0B0C0D0E0F011";
    private Status status;
    private Server threadServer;
    private Cliente threadCliente;
    private Envelope envelope;

    public Peer()
    {
        status = Status.ON;
        envelope = new Envelope();
        threadServer = new Server( uuidgen, envelope, status );
        threadCliente = new Cliente( uuidgen, envelope, status );
    }

    public void inicializarThreads() {
        new Thread( threadServer ).start();
        new Thread( threadCliente ).start();
    }
    
    public static void main(
        String[] args )
    {
        Peer peer = new Peer();
        peer.inicializarThreads();
        // new Thread( new Server( uuidgen, envelope, status ) ).start();
        // new Thread( new Cliente( uuidgen, envelope, status ) ).start();
    }
}